<template>
    <li >
        <p><slot></slot></p>
        <div class="progress_bar">
            <div class="progress_bar_length_back" >
                <div class="progress_bar_length" :style="{'background':backgrounds,'width':time+'%'}"></div>
            </div>
            <p>{{time}}%</p>
        </div>

    </li>
</template>

<script>

export default {
    name: "ProgressBar",
    props:{
        backgrounds:String,
        time:String,
    },

}
</script>

<style scoped>

.progress li{
    margin-bottom: 5px;
}
.progress_bar{
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
}
.progress_bar p{
    min-width: 40px;
    font-size: 14px;
    text-align: center;
}
.progress_bar_length_back{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 14rem;
    height:0.7rem ;
    background: #e5e3e3;
    border-radius: 10px;
    margin-right: 5px;
    margin-top: 2px;
}
.progress_bar_length{
    position: relative;
    width: 20%;
    height:0.7rem ;
    border-radius: 10px;
}
.progress_bar_length::after{
    position: absolute;
    top: 0;
    left: 0;
    content: "";
    display: inline-block;
    width: 100px;
    height: 10px;
    background: url("/img/common/shizhong.png") no-repeat 0 1px;
    background-size: 10%;
}
</style>